﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SQLite;
using System.Windows.Forms;
namespace libry
{
    //借阅表
    class BookBorrow
    {
        private int borrowId;//借阅表id
        private int bokId;//借阅的图书id
        private int userId;//借阅人的id
        private String bookLocatedId;//图书位置
        private DateTime beginTime;//借阅时间
        private DateTime endTime;//还书时间
        private long returned;//为0是还没还，为1是已经还了

        public int BorrowId { get => borrowId; set => borrowId = value; }
        public int BokId { get => bokId; set => bokId = value; }
        public int UserId { get => userId; set => userId = value; }
        public DateTime BeginTime { get => beginTime; set => beginTime = value; }
        public DateTime EndTime { get => endTime; set => endTime = value; }
        public long Returned { get => returned; set => returned = value; }
        public string BookLocatedId { get => bookLocatedId; set => bookLocatedId = value; }

        public BookBorrow() { }
        public BookBorrow(int borrowId, int bokId, int userId, String bookLocatedId, DateTime beginTime, DateTime endTime, int returned)
        {
            this.borrowId = borrowId;
            this.bokId = bokId;
            this.userId = userId;
            this.beginTime = beginTime;
            this.endTime = endTime;
            this.returned = returned;
            this.bookLocatedId = bookLocatedId;
        }

    }
    class BookBorrowWithName
    {

        private int borrowId;//借阅表id
        private int bokId;//借阅的图书id
        private String bokName;//借阅的图书名称
        private int userId;//借阅人的id
        private String userEmail;//借阅人的邮箱，也就是用户名
        private DateTime beginTime;//借阅时间
        private DateTime endTime;//还书时间
        private int returned;//为0是还没还，为1是已经还了

        public int BorrowId { get => borrowId; set => borrowId = value; }
        public int BokId { get => bokId; set => bokId = value; }
        public string BokName { get => bokName; set => bokName = value; }
        public int UserId { get => userId; set => userId = value; }
        public string UserEmail { get => userEmail; set => userEmail = value; }
        public DateTime BorrowTime { get => beginTime; set => beginTime = value; }
        public DateTime ReturnTime { get => endTime; set => endTime = value; }
        public int Returned { get => returned; set => returned = value; }

        public BookBorrowWithName() { }
        public BookBorrowWithName(int borrowId, int bokId, String bokName, int userId, String userName, DateTime beginTime, DateTime endTime, int returned)
        {
            this.borrowId = borrowId;
            this.bokId = bokId;
            this.bokName = bokName;
            this.userId = userId;
            this.userEmail = userName;
            this.beginTime = beginTime;
            this.endTime = endTime;
            this.returned = returned;
        }
    }
    class BookBorrowShow
    {

        private int borrowId;//借阅表id
        private String bokName;//借阅的图书名称
        private String userEmail;//借阅人的邮箱，也就是用户名
        private DateTime beginTime;//借阅时间
        private DateTime endTime;//还书时间
        private int returned;//为0是还没还，为1是已经还了

        public int BorrowId { get => borrowId; set => borrowId = value; }
        public string BokName { get => bokName; set => bokName = value; }
        public string UserEmail { get => userEmail; set => userEmail = value; }
        public DateTime BorrowTime { get => beginTime; set => beginTime = value; }
        public DateTime ReturnTime { get => endTime; set => endTime = value; }
        public int Returned { get => returned; set => returned = value; }

        public BookBorrowShow() { }
        public BookBorrowShow(int borrowId, String bokName, String userName, DateTime beginTime, DateTime endTime, int returned)
        {
            this.borrowId = borrowId;
            this.bokName = bokName;
            this.userEmail = userName;
            this.beginTime = beginTime;
            this.endTime = endTime;
            this.returned = returned;
        }
    }


}
